import React, { Component } from 'react';// 各种包一定要注意导入
import {
    Platform,
    StyleSheet,
    Text,
    View,
    NativeModules,
    ScrollView,
    Image
} from 'react-native';


import ScreenUtil from '../../com/ScreenUtil';

export default class FitSize extends React.Component {

    render() {

        return (
            <View>
                <Text style={{ fontSize: 30 }}>没适配,本机像素：{PixelRatio.get()}</Text>
                <Text style={{ fontSize: ScreenUtil.setSpText(30) }}>已适配</Text>
                <View style={{
                    height: 50, width: 240, backgroundColor: 'green'
                }}></View>
                <View style={{
                    height: ScreenUtil.scaleSize(50),
                    width: ScreenUtil.scaleSize(240),
                    backgroundColor: 'red'
                }}></View>

            </View>
        )
    }

}